<html xmlns="http://www.w3c.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:head>

	<script type="text/javascript">
  //<![CDATA[
   //debe usarse los \\:  en lugar de : en los selectores de JQuery
   $( document ).ready(function() {	  
	 console.log('Listo');
	});        
   
   function processLogin(xhr, status, args) {
		setTimeout(function() {
			window.location = args.view;
		}, 500);
	}
//]]>
</script>
<link rel="stylesheet" type="text/css" href="css/estilo.css"  />
<script type="text/javascript" src="js/main.js" />
</h:head>
<h:body>
    <br/>
	<CENTER><h1>
		<h:outputLabel value="Robot Explorador" />
	</h1></CENTER>
	<h:form id="form_login">
	<h3 id="estiloletras1">Ingrese y tenga una gran experiencia con el robot explorador</h3>
		<div class="clearfix common-panel text-align-center">
			<div id="estilo1" class="clearfix width-400px">
			    <IMG id="estiloimg1"  SRC="images/usuario.png"/>
	            <div id="estilo2">
				    <div class="ui-form-row clearfix text-align-left">
					    <h:outputLabel for="username"
						value="#{i18n['lbl.login.user_name']}" />
				    </div>
				    <div class="ui-form-row clearfix text-align-left">
					    <p:inputText value="#{loginController.userName}" id="username" required="true" label="username" />
				    </div>
				    <div class="ui-form-row clearfix text-align-left">
					    <h:outputLabel for="password" value="#{i18n['lbl.login.password']}" />
				    </div>
				    <div class="ui-form-row clearfix text-align-left">
					    <p:password value="#{loginController.password}" id="password" required="true" label="password" />
				    </div>
				</div>
				<div class="ui-form-row clearfix text-align-center">
				    <p:commandButton id="loginButton" value="#{i18n['lbl.login.login']}" actionListener="#{loginController.login}" 
				                     oncomplete="processLogin(xhr, status, args)" />
			    </div>
			    <br/>
			   
			    <div id="estilo3">
			       <p:commandLink  value="Crear cuenta"  oncomplete="currentPage('formulario.xhtml')"/>
			    </div>
			</div>
		</div>
	</h:form>
</h:body>
</html>